package com.cq.oa.session;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import oa.base.session.SessionManger;

/**
 * session 监听
 * @author lilang
 *
 */
public class SessionListener implements HttpSessionListener{

	public void sessionCreated(HttpSessionEvent se) {
		
	}

	/**
	 * 当session 消失的时候
	 */
	public void sessionDestroyed(HttpSessionEvent se) {
		if(SessionManger.getSessionUser(se.getSession())!=null){
			SessionManger.removeUserInfo(se.getSession());
		}
	}

}
